home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 15841 < prev    next >
Encoding:
Text File  |  1996-08-05  |  771 b   |  42 lines

  1. Path: grimsel.zurich.ibm.com!usenet
  2. From: wgk@zurich.ibm.com (Keith Whittingham)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: easy c++ question
  5. Date: 8 Apr 1996 13:12:01 GMT
  6. Organization: IBM Research, ZRH
  7. Message-ID: <4kb3b1$kjm@grimsel.zurich.ibm.com>
  8. References: <316901DA.3138C677@ablecom.net>
  9. Reply-To: wgk@zurich.ibm.com
  10. NNTP-Posting-Host: pine.zurich.ibm.com
  11. X-Newsreader: IBM NewsReader/2 v1.00
  12.  
  13. In <316901DA.3138C677@ablecom.net>, The Letter O <jczech@ablecom.net> writes:
  14.  
  15.  
  16. class Stack
  17.   {
  18.   public:
  19.     Stack(void) { count = 0; }
  20.     // ...
  21.  
  22.   private:
  23.     int count;
  24.     // ...
  25.   };
  26.  
  27.  
  28. int main(int argc,char *argv[])
  29.   {
  30.   Stack s;
  31.     // ...
  32.   return 0;
  33.   }
  34.  
  35. will certainly call the constructor Stack::Stack() which is basically what
  36. your doing I guess?
  37.  
  38. Keith
  39.  
  40.  
  41.  
  42.